/**
 * Created by Dalyn on 2017/4/06.
 */
import Relay from "react-relay";

export default class getMessageTotalMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { queryMessagesByCompanyId }`;
    }

    getVariables() {
        return {
            argsInput: {
              enId: this.props.enId,
              pageSize: this.props.pageSize,
              pageNum: this.props.pageNum,
              msgStatus: this.props.msgStatus
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on queryMessagesByCompanyIdPayload {
            queryMessagesByCompanyId {
                errorCode
                value
                totalResult
                id
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
                fragment on queryMessagesByCompanyIdPayload {
                    queryMessagesByCompanyId {
                        errorCode
                        value
                        totalResult
                        id
                    }
                }
            `]
        }];
    }

}
